//
//  UIImageView+TYZAdd.m
//  VehicleInsuranceSupport
//
//  Created by TangBin on 2019/11/4.
//  Copyright © 2019 TangBin. All rights reserved.
//

#import "UIImageView+TYZAdd.h"



@implementation UIImageView (TYZAdd)

/**
 创建Imageview
 
 @param superView 父视图
 @return return value description
 */
+ (UIImageView *)createWithImageView:(UIView *)superView frame:(CGRect)frame defaultImage:(UIImage *)image propertiesBlock:(void(^)(UIImageView *imageView))block
{
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame];
    imageView.image = image;
    if (superView)
    {
        [superView addSubview:imageView];
    }
    
    if (block)
    {
        block(imageView);
    }
    return imageView;
}

@end
